<?php
namespace Modules\Admin\Controllers;

class UserWalletLogController extends \Phalcon\Mvc\Controller {
  public function pagerByFieldAction($value) {
    $parameters = [
      'conditions' => [
        'account' => [
          'user_code' => $this -> request -> getQuery('user_code', 'string', '', true)
        ],
        'log' => [
          'type' => $this -> request -> getQuery('type', 'int', '', true)
        ]
      ]
    ];

    return $this -> response -> setJsonContent($this -> user::getWalletLogLogicInstance() -> pagerByField($value, $parameters, $this -> request -> getQuery('limit', 'int', 10, true), $this -> request -> getQuery('page', 'int', 1, true)));
  }
}
